Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a History of the changes inside a Template Layout/ Use this Hi… #29752

Conversation

freddyDOTCMS
Copy link
Contributor

@freddyDOTCMS freddyDOTCMS commented Aug 26, 2024

The problem here is that when you send a TemplateLayout after changed it to a receiver we don't have a way to know witch was the movement on the receiver because the UUID are already all recalculated, and the multi_tree are not sent unless you sent the page too.

The fix was create a new history on the layout to know how the UUID of each Container have been move, also I created a new version attribute to count how many time the Layout have changed.

Proposed Changes

  • Change in the Handler to use the method to update the Layout when the Template already exists on the receiver

https://github.com/dotCMS/core/pull/29752/files#diff-1e5a19fcdfdbe883752308cb7adf42231e860dff8300edf8b20c66f8b2b0fd39R168-R185

This method also recalculated the UUID.

  • Create a new History field

https://github.com/dotCMS/core/pull/29752/files#diff-8a7533dd3f0219197b317cfcfc4848a3e61492c38f1bac1d5aeaec566025c626R50

  • keep the history when update a TemplateLayout

https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1433

  • Create a new version field

https://github.com/dotCMS/core/pull/29752/files#diff-edc3e1981140c3dc84b3fbab35e5afb0ffc0e9f3f8b47673ed42da6939bf83fbR58

  • recalculated the version when the TemplateLayout is saved

https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1306

  • Calculate the changes using the new History attribute on the receiver

https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1319

https://github.com/dotCMS/core/pull/29752/files#diff-acae9e18f11a2e8737fad0e31d65f09f2e330c049e6320996de89ed5ef495ef4R26

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #29148

@freddyDOTCMS freddyDOTCMS marked this pull request as ready for review August 28, 2024 18:49
@freddyDOTCMS freddyDOTCMS enabled auto-merge August 28, 2024 19:08
@freddyDOTCMS freddyDOTCMS added this pull request to the merge queue Aug 29, 2024
Merged via the queue into master with commit 683ff1b Aug 29, 2024
31 checks passed
@freddyDOTCMS freddyDOTCMS deleted the issue-29148-Modifying-the-Template-breaks-pages-on-the-receiver branch August 29, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifying the Template breaks pages on the receiver
4 participants